<template>
	<view>
		<view class="nav">
			<uni-nav-bar leftWidth="750rpx"   left-icon="back" leftText="关注" @clickLeft="back"></uni-nav-bar>
		</view>
		<view>
			<view class="list" v-for="v in attlist">
				<view>
					<image :src="imageUrl+v.avatarPath"></image>
					<view>{{v.nickName}}</view>
				</view>
				<view class="switch">已关注</view>
			</view>
			
		</view>
	</view>
</template>

<script>
import http from '@/utils/http.js'
	export default {
		data() {
			return {
				attlist:[],
				imageUrl:"http://mnxc.xyz:8080/common/download?name=",
				
			}
		},
		onShow(){
			this.showmessage()
		},
		methods: {
			showmessage(){
				http({
					url:`/user/getAttention`,
					params:{
						id:1
					},
					success:(res)=>{
						console.log(res)
						this.attlist=res.data.data
					}
				})
				
			},
			
			
			
			
			
			
			back(){
				uni.switchTab({
					url:'/pages/mine/mine'
				})
			}
		}
	}
</script>

<style>
.nav{
	
	

	height: 140rpx;
	width: 750rpx;
	display: flex;

	align-items: center;
}
.list{
	width: 750rpx;
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-right: 20rpx;
}
.list>view:nth-child(1){
	display: flex;
	justify-content: space-around;
	align-items: center;
}

.switch{
	
		height: 40rpx;
		width: 120rpx;
		background: #00ad00;
		margin-right: 20rpx;
		border-radius: 20rpx;
		
}
.list{
	padding-right: 30rpx;
	margin-top: 10rpx;
	text-align: center;
	/* color: aliceblue; */
}
.list image{
	margin-right: 10px;
	width: 30px;
	height: 30px;
}
</style>
